package me.send.data.service.mapper;

import java.util.List;
import java.util.Map;

import me.send.data.service.BaseMapper;
import me.send.data.service.provider.FeedbackProvider;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;

public abstract interface FeedbackMapper extends BaseMapper {

	// 分页查询所有的
	@SelectProvider(method = "list_page", type = FeedbackProvider.class)
	@Results({
			@Result(property = "userid", column = "userid"),
			@Result(property = "user", column = "userid", one = @One(select = user_mapper_all
					+ "map_userid")) })
	public abstract List<Map<String, Object>> list_page(
			Map<String, Object> parameter);
	
	@SelectProvider(method = "list_broker_page", type = FeedbackProvider.class)
	public abstract List<Map<String, Object>> list_broker_page(
			Map<String, Object> parameter);

	@SelectProvider(method = "count", type = FeedbackProvider.class)
	public abstract int count(Map<String, Object> parameter);
	
	@SelectProvider(method = "count_broker", type = FeedbackProvider.class)
	public abstract int count_broker(Map<String, Object> parameter);

	@DeleteProvider(method = "batch_delete", type = FeedbackProvider.class)
	public abstract void batch_delete(Map<String, Object> parameter);
}
